<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <!-- 包含公共顶部文件 -->

</head>

<body>
<header th:insert="common/top"></header>
<!-- 背景视频 -->
<video autoplay loop muted playsinline id="background-video">
    <source th:src="@{/images/main_bg.mp4}" type="video/mp4" />
</video>

<div id="BackLink">
    <a th:href="@{/mainForm}">Return to Main Menu</a>
</div>

<div id="Catalog">
    <h2 th:text="${session.category.name}"></h2>

    <table>
        <tr>
            <th>Product ID</th>
            <th>Name</th>
        </tr>
        <!-- 遍历产品列表 -->
        <tr th:each="product : ${session.productList}">
            <td>
                <a th:href="@{/productForm(productId=${product.productid})}" th:text="${product.productid}"></a>
            </td>
            <td th:text="${product.name}"></td>
        </tr>
    </table>
</div>

<!-- 包含公共底部文件 -->
<footer th:replace="common/bottom"></footer>
</body>
</html>


